package tech.aistar.service.impl;

import org.apache.ibatis.session.SqlSession;
import tech.aistar.entity.PhoneDetail;
import tech.aistar.mapper.PhoneDetailMapper;
import tech.aistar.service.IPhoneDetailService;
import tech.aistar.util.MybatisUtil;

/**
 * @Author: lya
 * @Description: 本类的作用描述:
 * @CreateDate: 2019/9/7
 * @Version: 1.0
 */
public class PhoneDetailServiceImpl implements IPhoneDetailService {

    @Override
    public PhoneDetail findById(Integer phoneId) {
        SqlSession sqlSession = MybatisUtil.getSqlSession();
        PhoneDetailMapper mapper = sqlSession.getMapper(PhoneDetailMapper.class);
        PhoneDetail phoneDetail = mapper.findById(phoneId);
        MybatisUtil.close(sqlSession);
        return phoneDetail;
    }
}
